/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.phone.entity;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 厂商Entity
 * @author lzw
 * @version 2019-04-03
 */
@Table(name="manufacturer", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true,isInsert = false ),
		@Column(name="name", attrName="name", label="厂商名称", queryType=QueryType.LIKE),
		@Column(name="address", attrName="address", label="地址"),
		@Column(name="phone", attrName="phone", label="联系人手机号",queryType = QueryType.LIKE),
		@Column(name="legal_person", attrName="legalPerson", label="法人",queryType = QueryType.LIKE),
	}, orderBy="a.id DESC"
)
public class Manufacturer extends DataEntity<Manufacturer> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 厂商名称
	private String address;		// 地址
	private String phone;		// 联系人手机号
	private String legalPerson;		// 法人

	public String getLegalPerson() {
		return legalPerson;
	}

	public void setLegalPerson(String legalPerson) {
		this.legalPerson = legalPerson;
	}

	public Manufacturer() {
		this(null);
	}

	public Manufacturer(String id){
		super(id);
	}
	
	@Length(min=0, max=11, message="厂商名称长度不能超过 11 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=50, message="地址长度不能超过 50 个字符")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	@Length(min=0, max=20, message="联系人手机号长度不能超过 20 个字符")
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	

}